-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bacpop-181 CSV export project #78
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #78 +/- ##
==========================================
+ Coverage 98.60% 98.64% +0.03%
==========================================
Files 31 32 +1
Lines 1793 1841 +48
Branches 220 229 +9
==========================================
+ Hits 1768 1816 +48
Misses 24 24
Partials 1 1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great - couple of tiny potential nitpicks:
- should maybe be consistent about capitalising the column headers - currently all the drug names are capitalised but cluster and filename are not,
- I think silently putting "run for cluster assignment" into the file seems a bit strange. I think it would be better to warn user "Cluster values will be blank in exported file, as analysis has not yet run. Export anyway?" - and get them to confirm, then just leave cluster values empty.
- Commas aren't escaped in the csv generation, so you end up with an extra column in the row if you've got a filename with a comma in it (should wrap these values in double quotes I think). I tried this and found that that sample failed analysis anyway - probably because of a similar issue in the back end! But that showed up another issue with putting "run analysis.." if the cluster is missing, as it shows that for failed samples too, where running won't make a difference. I think having cluster be blank for those samples would be fine too.
|
I see what you mean, but it just seems weird to pollute output data with a user instruction, especially if we're assuming that they know what they're doing... Could include 'don't warn again' in the dialog, or could pop up some non-intrusive toast saying "Exported without cluster values (run analysis to include next time)" or something like that.
oh, ok! |
Dangerous assumption! 😆 |
yup agree there shouldn't be a weird user instruction in output, thus have made it empty if not present |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
The following PR allows for users to export the project in csv format. The button shown in below screenshot. the csv will have columns filename, (...amr for each antibiotic), cluster.... if there is no cluster the text run for cluster assignment will show.
Testing: